<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <demo>
            <!-- 插槽<slot></slot> -->
            <h1>来自父组件的内容</h1>
        </demo>
    </div>

    <script src="./vue.js"></script>
    <script>
        Vue.component("demo", {
            template: `<h1>
                <slot></slot>
                插槽的例子

            </h1>`
        })

        let vm = new Vue({
            el: "#app"
        })
    </script>
</body>
</html>